package com.dys.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: 疾风
 * @ClassName: Person
 * @Description: 实体类
 * @CreateDate: 2024/11/20
 * @Version: v1.0.0
 */
@Component
// @ConfigurationProperties(prefix = "person")
public class Person {
    private int id;
    @Value(value = "${person.name}")
    private String name;
    private int age;
    @Value(value = "#{17.5*10}")
    private double height;
    private double weight;
    private String email;
    private List<String> likes;

    public Person() {
    }

    public Person(int id, String name, int age, double height, double weight, String email, List<String> likes) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.height = height;
        this.weight = weight;
        this.email = email;
        this.likes = likes;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public List<String> getLikes() {
        return likes;
    }

    public void setLikes(List<String> likes) {
        this.likes = likes;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                ", weight=" + weight +
                ", email='" + email + '\'' +
                ", likes=" + likes +
                '}';
    }
}
